import java.util.Scanner;

public class Main1 {
    public static int func(int n){
        if(n==1) return 2;
        return n*n+1;
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int ret=0,sum=0;
        while (sc.hasNextInt()){
            for (int i = 1; i <=n; i++) {
                sum+=func(i);
            }
            System.out.println(sum);

        }
    }
}
